import cookie from "cookie_js";

const keyToken = "admin_token";
const keyUser = "admin_user";

export function getToken() {
  return cookie.get(keyToken);
}

export function setToken(token) {
  return cookie.set(keyToken, token);
}

export function removeToken() {
  return cookie.remove(keyToken);
}

export function getUser() {
  return cookie.get(keyUser);
}

export function setUser(user) {
  return cookie.set(keyUser, user);
}

export function removeUser() {
  return cookie.remove(keyUser);
}
